package com.wyx.suanfa;

/**
 * @author 王艺锡
 * @version 1.0
 */
public class repeatedSubstringPattern {
    public static void main(String[] args) {
        String s = "ababcab";
        String str = s + s;
        //切割字符串，前闭后开
        str = str.substring(1,str.length() - 1);
        System.out.println(str);
        if(str.contains(s)){
            System.out.println("由重复子串构成");
        }else {
            System.out.println("没有重复子串构成");
        }

    }
}
